package model;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.Email;

public class User {

	private int id;
	@NotNull(message="用户名不能为空")
	@Size(min=2,max=11,message="用户名长度必须在2-11之间！")	
	private String userName;
	//@NotNull(message="密码不能为空")
	//@Size(min=6,max=11,message="密码长度必须在6-11之间！")
	private String password;
	private String realName;
	private String warnPhone1;
	private String warnPhone2;
	private String warnEmail1;
	private String warnEmail2;
	private String warnWeChat;
	@NotNull(message="电话号码不能为空")
	@Size(min=11,max=11,message="电话号码长度必须为11位！")	
	private String phoneNumber;
	@Email(message="请填写正确的邮箱")
	private String email;
	private String otherContact;
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getRealName() {
		return realName;
	}
	public void setRealName(String realName) {
		this.realName = realName;
	}
	public String getWarnPhone1() {
		return warnPhone1;
	}
	public void setWarnPhone1(String warnPhone1) {
		this.warnPhone1 = warnPhone1;
	}
	public String getWarnPhone2() {
		return warnPhone2;
	}
	public void setWarnPhone2(String warnPhone2) {
		this.warnPhone2 = warnPhone2;
	}
	public String getWarnEmail1() {
		return warnEmail1;
	}
	public void setWarnEmail1(String warnEmail1) {
		this.warnEmail1 = warnEmail1;
	}
	public String getWarnEmail2() {
		return warnEmail2;
	}
	public void setWarnEmail2(String warnEmail2) {
		this.warnEmail2 = warnEmail2;
	}
	public String getWarnWeChat() {
		return warnWeChat;
	}
	public void setWarnWeChat(String warnWeChat) {
		this.warnWeChat = warnWeChat;
	}
	public String getPhoneNumber() {
		return phoneNumber;
	}
	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getOtherContact() {
		return otherContact;
	}
	public void setOtherContact(String otherContact) {
		this.otherContact = otherContact;
	}
	@Override
	public String toString() {
		return "User [id=" + id + ", userName=" + userName + ", password="
				+ password + ", phoneNumber=" + phoneNumber + "]";
	}
	public User(int id, String userName, String password, String phoneNumber) {
		super();
		this.id = id;
		this.userName = userName;
		this.password = password;
		this.phoneNumber = phoneNumber;
	}
	public User() {
		super();
	}
	
}
